<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%-- 
    JSP Name : da_200_02E.jsp
    Description : CSR 소식 상세.(영문)
    author Seung Hun
    since 2012. 8. 20.
    version 1.0
    Modification Information
       since          author              description
    ===========    =============    ===========================
    2012. 8. 20.     Seung Hun     최초 생성
--%>
<%@ include file="/WEB-INF/jsp/co/mn/include/declare.jspf" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>CSR News &#124; HMC CSR</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<%@ include file="/WEB-INF/jsp/co/us/include/header.jspf" %>
<link rel="stylesheet" type="text/css" href="/css/usr/eng.css" media="screen" />
<script type="text/javaScript" language="javascript">
$(document).ready(function() {    
    /* form validation check */
    onloadCharCheck();
    
    /* List Page 이동 */
    $("#listButn").bind("click", moveListPage);
});

/*
 * 리스트페이지 이동
 */
function moveListPage() {
    $("#mainForm").attr('action','/da_200_01.do').submit();
}
 
/*
 * 상세페이지 이동
 */
function moveDtlPage(idx) {
    $("#blbIdx").val(idx);
    $("#mainForm").attr('action','/da_200_02.do').submit();
}

/*
 * 스크립트 Split
 */
function stringSplit(strData, strIndex){ 
    var stringList = new Array();
    
    while(strData.indexOf(strIndex) != -1) {
        stringList[stringList.length] = strData.substring(0, strData.indexOf(strIndex)); 
        strData = strData.substring(strData.indexOf(strIndex)+(strIndex.length), strData.length); 
    }
    
    stringList[stringList.length] = strData; 
    return stringList; 
   }


/*
 * 페이스북 Share 링크
 */
function goFaceBook(title, link) {
    var arrLink = stringSplit(link, "?");
     
    var fullUrl;     
    var url = arrLink[0]+"?blbIdx="+$("#blbIdx").val();
    var title = title;     
    var summary = "${fn:replace(result.titl, '"', '')}";       
    var pWidth = 640;     
    var pHeight = 380; 
    var pLeft = (screen.width - pWidth) / 2;     
    var pTop = (screen.height - pHeight) / 2;       
    fullUrl = "http://www.facebook.com/share.php?s=100&p[url]="+ url                 
    //+"&p[images][0]="+ image                 
    +"&p[title]="+ title                 
    +"&p[summary]="+ summary;     
    
    fullUrl = fullUrl.split("#").join("%23");     
    fullUrl = encodeURI(fullUrl);    
    
    window.open(fullUrl, "facebook", "width="+ pWidth +",height="+ pHeight +",left="+ pLeft +",top="+ pTop +",location=no,menubar=no,status=no,scrollbars=no,resizable=no,titlebar=no,toolbar=no"); 
}

/*
 * 트위터 Share 링크
 */
function goTwitter(title, link) {
    var pWidth = 640;     
    var pHeight = 380; 
    var pLeft = (screen.width - pWidth) / 2;     
    var pTop = (screen.height - pHeight) / 2;       
    
    var href = "http://twitter.com/intent/tweet?text=" + encodeURIComponent(title) + " " + encodeURIComponent(link);
    var a = window.open(href, 'twitter', "width="+ pWidth +",height="+ pHeight +",left="+ pLeft +",top="+ pTop +",location=no,menubar=no,status=no,scrollbars=no,resizable=no,titlebar=no,toolbar=no");
    if(a) { a.focus(); }
}

</script>
</head>
<body>
<div id="wrap">

    <!-- top -->
    <%@ include file="/WEB-INF/jsp/co/us/include/topE.jsp" %>
    <!-- top -->

    <!-- container -->
    <div id="container">
        <div id="contentsWrap">
            <div id="contentsArea">
                <div class="headingArea">
                    <h2>CSR News</h2>
                </div>
                <div id="contetns">
                    <div class="location">
                        <a href="/ma_100_01.do">Home</a>
                        <a href="/da_100_01.do">CSR Materials</a>
                        <span>CSR News</span>
                    </div>
                    <div class="snsArea">
                        <a href="javascript:goFaceBook('CSR Materials - CSR News', location.href);"><img src="/img/usr/eng/common/facebook.gif" alt="Share on Facebook" /></a>
                        <a href="javascript:goTwitter('CSR Materials- CSR News', location.href);"><img src="/img/usr/eng/common/tweeter.gif" alt="Share on Twitter" /></a>
                    </div>
                    <form id="mainForm" name="mainForm" method="post">
                        <input type="hidden" id="currentPageNo" name="currentPageNo" value="${rqInfo.currentPageNo }" />
                        <input type="hidden" id="srchScn" name="srchScn" value="${rqInfo.srchScn }" />
                        <input type="hidden" id="srchTxt" name="srchTxt" value="${rqInfo.srchTxt }" />
                        <input type="hidden" id="blbIdx" name="blbIdx" value="${result.blbIdx }" />
                        <input type="hidden" id="contCd" name="contCd" value="${rqInfo.contCd }" />
                        <input type="hidden" id="natCd" name="natCd" value="${rqInfo.natCd }" />
                        <%-- Locale --%>
                        <input type="hidden" id="CSR_LOCALE_PARAM" name="CSR_LOCALE_PARAM" value="en" />
                    <table border="1" class="tableData" summary="CSR 소식의 구분,등록일,제목,첨부파일,내용등이 기재 되어있는 표">
                        <col width="20%" />
                        <col width="80%" />
                        <tbody>
                            <tr>
                                <td class="subThead">Information Type</td>
                                <td>${result.contCd } &#124; ${result.natCd }</td>
                            </tr>
                            <tr>
                                <td class="subThead">Date Updated</td>
                                <td class="num">${result.rgstDt }</td>
                            </tr>
                            <tr>
                                <td class="subThead">Subject</td>
                                <td>${result.titl }</td>
                            </tr>
                            <tr>
                                <td class="subThead">Attachments</td>
                                <td><a href="#" onclick="getUpFileDownload('0050','${result.blbIdx}');return false;">${result.filNm }</a></td>
                            </tr>
                            <tr>
                                <td colspan="2" class="dataView">
                                    <div class="viewArea">
                                        ${result.sbc }
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td class="subThead">Next</td>
                                <td>
                                <c:choose>
                                    <c:when test="${nextViewResult != null}">
                                        <a href="#none" onclick="moveDtlPage('${nextViewResult.blbIdx}');return false;">${nextViewResult.titl }</a>
                                    </c:when>
                                    <c:otherwise>
                                        No next writing.
                                    </c:otherwise>
                                </c:choose>
                                </td>
                            </tr>
                            <tr>
                                <td class="subThead">Previous </td>
                                <td>
                                <c:choose>
                                    <c:when test="${preViewResult != null}">
                                        <a href="#none" onclick="moveDtlPage('${preViewResult.blbIdx}');return false;">${preViewResult.titl }</a>
                                    </c:when>
                                    <c:otherwise>
                                        No previous writing.
                                    </c:otherwise>
                                </c:choose>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    </form>
                    <div class="btnArea down">
                        <span class="reverse"><a href="#" id="listButn"><img src="/img/usr/eng/btn/btn_list.gif" alt="list" /></a></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- /container -->

    <!-- footer -->
    <%@ include file="/WEB-INF/jsp/co/us/include/bottomE.jsp" %>
    <!-- /footer -->
    
</div>
</body>
</html>